<template>
    <p :class="{'active':isActive}">Class样式绑定</p>
    <p :class="classObject">Class样式绑定</p>
</template>

<script>
    export default {
        data() {
            return {
                isActive: true,
                classObject: {
                    'active': true,
                }
            }
        }
    }
</script>
<style>
    .active {
        color: red;
    }
</style>